package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HaPatientMapper;
import com.ruoyi.system.domain.HaPatient;
import com.ruoyi.system.service.IHaPatientService;

/**
 * 患者管理Service业务层处理
 * 
 * @author 鲍小伟
 * @date 2025-11-04
 */
@Service
public class HaPatientServiceImpl implements IHaPatientService 
{
    @Autowired
    private HaPatientMapper haPatientMapper;

    /**
     * 查询患者管理
     * 
     * @param uid 患者管理主键
     * @return 患者管理
     */
    @Override
    public HaPatient selectHaPatientByUid(Long uid)
    {
        return haPatientMapper.selectHaPatientByUid(uid);
    }

    /**
     * 查询患者管理列表
     * 
     * @param haPatient 患者管理
     * @return 患者管理
     */
    @Override
    public List<HaPatient> selectHaPatientList(HaPatient haPatient)
    {
        return haPatientMapper.selectHaPatientList(haPatient);
    }

    /**
     * 新增患者管理
     * 
     * @param haPatient 患者管理
     * @return 结果
     */
    @Override
    public int insertHaPatient(HaPatient haPatient)
    {
        haPatient.setCreateTime(DateUtils.getNowDate());
        return haPatientMapper.insertHaPatient(haPatient);
    }

    /**
     * 修改患者管理
     * 
     * @param haPatient 患者管理
     * @return 结果
     */
    @Override
    public int updateHaPatient(HaPatient haPatient)
    {
        haPatient.setUpdateTime(DateUtils.getNowDate());
        return haPatientMapper.updateHaPatient(haPatient);
    }

    /**
     * 批量删除患者管理
     * 
     * @param uids 需要删除的患者管理主键
     * @return 结果
     */
    @Override
    public int deleteHaPatientByUids(Long[] uids)
    {
        return haPatientMapper.deleteHaPatientByUids(uids);
    }

    /**
     * 删除患者管理信息
     * 
     * @param uid 患者管理主键
     * @return 结果
     */
    @Override
    public int deleteHaPatientByUid(Long uid)
    {
        return haPatientMapper.deleteHaPatientByUid(uid);
    }
}
